﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using WPFTools.Dialogs;

namespace WPFToolsDemo
{
    /// <summary>
    /// FButton.xaml 的交互逻辑
    /// </summary>
    public partial class FButton : Window
    {
        public FButton()
        {
            InitializeComponent();
        }
        private WaitingBox _box;

        private void FButton_Click(object sender, RoutedEventArgs e)
        {
            _box = new WaitingBox(test);
            _box.Owner = this;
            _box.Text = "Hell";
            //MessageBox.Show("Hello!");
            //WaitingBox.Show(this,test);
            _box.ShowDialog();

        }

        private void test()
        {
            for (int i = 0; i < 10;i++ )
            {
                _box.ChangeText(i.ToString());
                System.Threading.Thread.Sleep(1000);
            }
            
        }
    }
}
